pkgname=perf
pkgver=git
pkgrel=1
url='https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git'
arch=('i386' 'x86_64' 'riscv64' 'aarch64')
license=('GPL')
makedepends_debian_11=(binutils-dev bison flex libaudit-dev libdw-dev libiberty-dev liblzma-dev libnuma-dev libunwind-dev zlib1g-dev python3 systemtap-sdt-dev libslang2-dev libgtk2.0-dev libperl-dev python3-dev python3-setuptools libzstd-dev libcap-dev libbabeltrace-dev)
source=('https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git')
md5sums=('SKIP')

build()
{
	cd $srcdir/linux/tools/perf

	PATH=$BUILD_DIR:$PATH make
}

package()
{
	benchmark_path="${pkgdir}/lkp/benchmarks/${pkgname}"
	mkdir -p $benchmark_path
	cp -af $srcdir/linux/tools/perf/perf $benchmark_path
}
